package com.wujian.love.service.impl;

import java.util.List;

import cn.hutool.core.convert.Convert;
import com.wujian.love.domin.RocketMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wujian.love.mapper.RocketMessageMapper;
import com.wujian.love.service.IRocketMessageService;

/**
 * rocketmq消息记录 服务层实现
 * 
 * @author cdw
 * @date 2020-07-08
 */
@Service
public class RocketMessageServiceImpl implements IRocketMessageService 
{
	@Autowired
	private RocketMessageMapper rocketMessageMapper;

	/**
     * 查询rocketmq消息记录信息
     * 
     * @param id rocketmq消息记录ID
     * @return rocketmq消息记录信息
     */
    @Override
	public RocketMessage selectRocketMessageById(Integer id)
	{
	    return rocketMessageMapper.selectRocketMessageById(id);
	}
	
	/**
     * 查询rocketmq消息记录列表
     * 
     * @param rocketMessage rocketmq消息记录信息
     * @return rocketmq消息记录集合
     */
	@Override
	public List<RocketMessage> selectRocketMessageList(RocketMessage rocketMessage)
	{
	    return rocketMessageMapper.selectRocketMessageList(rocketMessage);
	}
	
    /**
     * 新增rocketmq消息记录
     * 
     * @param rocketMessage rocketmq消息记录信息
     * @return 结果
     */
	@Override
	public int insertRocketMessage(RocketMessage rocketMessage)
	{
	    return rocketMessageMapper.insertRocketMessage(rocketMessage);
	}
	
	/**
     * 修改rocketmq消息记录
     * 
     * @param rocketMessage rocketmq消息记录信息
     * @return 结果
     */
	@Override
	public int updateRocketMessage(RocketMessage rocketMessage)
	{
	    return rocketMessageMapper.updateRocketMessage(rocketMessage);
	}

	/**
     * 删除rocketmq消息记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteRocketMessageByIds(String ids)
	{
		return rocketMessageMapper.deleteRocketMessageByIds(Convert.toStrArray(ids));
	}
	
}
